<template>
  <div class="container">
    <el-form
      ref="formDataRef"
      :model="cutOverInfoFormData"
      :label-position="labelPosition"
      label-width="80px"
      :rules="dataRules"
      :disabled="flagLevel == 'readOnly' ? true : false"
    >
      <el-row :gutter="10">
        <el-col :span="7">
          <el-form-item label="客户名称:" class="u-ipt">
            {{ cutOverInfo.custName }}
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="客户编码:" class="u-ipt">
            {{ cutOverInfo.custNumber }}
          </el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="客户经理A:" class="u-ipt">
            {{
              cutOverInfo.custManagerNameA ? cutOverInfo.custManagerNameA : ""
            }}
          </el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="客户经理B:" class="u-ipt">
            {{
              cutOverInfo.custManagerNameB ? cutOverInfo.custManagerNameB : ""
            }}
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="电子邮件A:" prop="emailA">
            <el-input
              placeholder=""
              dis
              v-model="cutOverInfoFormData.emailA"
              class="input-with-select"
            >
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="6" :offset="1">
          <el-form-item label="移动号码A:" prop="mobileNumberA">
            <el-input
              placeholder=""
              v-model="cutOverInfoFormData.mobileNumberA"
              class="input-with-select"
            >
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="电子邮件B:" prop="emailB">
            <el-input
              :disabled = "cutOverInfo.custManagerNameB ? false : true"
              placeholder=""
              dis
              v-model="cutOverInfoFormData.emailB"
              class="input-with-select"
            >
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="5">
          <el-form-item label="移动号码B:" prop="mobileNumberB">
            <el-input
             :disabled = "cutOverInfo.custManagerNameB ? false : true"
              placeholder=""
              v-model="cutOverInfoFormData.mobileNumberB"
              class="input-with-select"
            >
            </el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <div class="m-title"><span class="icon"></span>割接信息</div>
        <el-col :span="12">
          <el-form-item label="割接影响业务时长是否通知:" label-width="180px">
            <el-radio-group
              v-model="cutOverInfoFormData.ifInformLength"
              class="radio-box"
            >
              <el-radio label="1">是</el-radio>
              <el-radio label="2">否</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="带宽型产品中断类型:" label-width="180px">
            <el-checkbox-group
              v-model="cutOverInfoFormData.bandwidthType"
              size="small"
              @change="aaa"
            >
              <el-checkbox
                v-for="item in broadbandProductTypeArr"
                :label="item.val"
                :key="item.val"
                >{{ item.label }}
              </el-checkbox>
            </el-checkbox-group>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="平台型产品中断类型:" label-width="180px">
            <el-checkbox-group
              v-model="cutOverInfoFormData.platformType"
              size="small"
            >
              <el-checkbox
                v-for="item in broadbandProductTypeArr"
                :label="item.val"
                :key="item.val"
                >{{ item.label }}
              </el-checkbox>
            </el-checkbox-group>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="割接通知方式:" label-width="180px">
            <el-col :span="5">
              <el-radio-group
                v-model="cutOverInfoFormData.cutInformType"
                class="radio-box"
                
              >
                <el-radio label="1">电子邮件</el-radio>
                <el-radio label="2">传真</el-radio>
                <el-checkbox class="noteClass" v-model="cutOverInfoFormData.info" label="3">短信</el-checkbox>
              </el-radio-group>
            </el-col>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="手机短信:" label-width="180px">
            <el-col :span="5">
              <el-radio-group
                v-model="cutOverInfoFormData.ifSendPhoneMessage"
                class="radio-box"
                style="margin-bottom:10px"
              >
                <el-radio label="1">是</el-radio>
                <el-radio label="2">否</el-radio>
              </el-radio-group>
            </el-col>
            <el-col :span="24" v-show="cutOverInfoFormData.ifSendPhoneMessage == 1 || cutOverInfoFormData.ifSendPhoneMessage == '' ? true:false ">
              <el-radio-group
                v-model="cutOverInfoFormData.sendPhoneMessageQuantum"
                class="radio-box"
              >
                <el-radio label="0">所有时间段发送割接通知</el-radio>
                <el-radio label="1"
                  >仅当天16点:30分之后到第二天8:30之前收到，且这段时间内要完成的割接通知</el-radio
                >
                <el-radio label="3"
                  >所有时间段发送的割接通知均不发送短信通知</el-radio
                >
              </el-radio-group>
            </el-col>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="割接影响业务时间点是否通知:" label-width="180px">
            <el-col :span="5">
              <el-radio-group
                v-model="cutOverInfoFormData.ifInformTime"
                class="radio-box"
              >
                <el-radio label="1">是</el-radio>
                <el-radio label="2">否</el-radio>
              </el-radio-group>
            </el-col>
            <el-col :span="12" v-if="cutOverInfoFormData.ifInformTime == 1 || cutOverInfoFormData.ifInformTime == ''">
              <el-checkbox-group
                v-model="cutOverInfoFormData.infoTimeQuantum"
                size="small"
                @change="changeAllDate"
              >
                <el-checkbox
                  v-for="item in cutOverTimeArr"
                  :label="item.val"
                  :key="item.val"
                  @change="changeDate(item.val)"
                  >{{ item.label }}
                </el-checkbox>
              </el-checkbox-group>
            </el-col>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="割接通知语种(中文):" label-width="180px">
            <el-col :span="5">
              <el-radio-group
                v-model="cutOverInfoFormData.cutInformChinese"
                class="radio-box"
              >
                <el-radio label="1">是</el-radio>
                <el-radio label="2">否</el-radio>
              </el-radio-group>
            </el-col>
            <el-col :span="15">
              <el-form-item
                label="割接通知方式通知时使用的中文名称（割接邮件抬头):"
                label-width="300px"
                prop="cutInformChineseName"
              >
                <el-input
                  placeholder="请输入内容"
                  v-model="cutOverInfoFormData.cutInformChineseName"
                  class="input-with-select"
                >
                </el-input>
              </el-form-item>
            </el-col>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="割接通知语种(英文):" label-width="180px">
            <el-col :span="5">
              <el-col>
                <el-radio-group
                  v-model="cutOverInfoFormData.cutInformEnglish"
                  class="radio-box"
                >
                  <el-radio label="1">是</el-radio>
                  <el-radio label="2">否</el-radio>
                </el-radio-group>
              </el-col>
            </el-col>
            <el-col :span="15">
              <el-form-item
                label="割接通知方式通知时使用的中文名称（割接邮件抬头):"
                label-width="300px"
                prop="cutInformEnglishName"
              >
                <el-input
                  placeholder="请输入内容"
                  v-model="cutOverInfoFormData.cutInformEnglishName"
                  class="input-with-select"
                >
                </el-input>
              </el-form-item>
            </el-col>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="是否割接通知同步给网厅:" label-width="180px">
            <el-radio-group
              v-model="cutOverInfoFormData.ifSynchroToOnline"
              class="radio-box"
            >
              <el-radio label="1">是</el-radio>
              <el-radio label="2">否</el-radio>
            </el-radio-group>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
    <div class="m-title"><span class="icon"></span>接收单位联系信息</div>
    <div class="m-table-box">
      <el-table
        :data="
          tableData.slice(
            (tablePage.pageIndex - 1) * tablePage.pageSize,
            tablePage.pageIndex * tablePage.pageSize
          )
        "
        style="width: 100%"
        border
        :header-cell-style="{
          background: '#F2F2F2',
          color: '#333',
        }"
        @row-click="custManagerIdDialogRow"
        class="commonRegionId-table"
      >
        <el-table-column prop="contactName" label="联系人姓名">
        </el-table-column>
        <el-table-column prop="officePhone" label="办公电话"> </el-table-column>
        <el-table-column prop="mobilePhone" label="移动电话">
          <template v-slot="{ row }">
            <el-input
              v-model="row.mobilePhone"
              v-if="flagLevel == 'editFlag'"
              @blur="checkInput(row.mobilePhone,1)"
            ></el-input>
            <span v-else>{{ row.mobilePhone }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="eMail" label="Email">
          <template v-slot="{ row }">
            <el-input
              v-model="row.eMail"
              v-if="flagLevel == 'editFlag'"
              @blur="checkInput(row.eMail,2)"
            ></el-input>
            <span v-else>{{ row.eMail }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="fax" label="联系传真">
          <template v-slot="{ row }">
            <el-input
              v-model="row.fax"
              v-if="flagLevel == 'editFlag'"
              @blur="checkInput(row.fax,3)"
            ></el-input>
            <span v-else>{{ row.fax }}</span>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
        background
        @current-change="pageChange"
        :current-page="parseInt(tablePage.pageIndex)"
        :page-size="parseInt(tablePage.pageSize)"
        layout="total, prev, pager, next, jumper"
        :total="parseInt(tablePage.rowCount)"
        class="m-pagination"
      >
      </el-pagination>
    </div>

    <div
      class="button-sx-f clearfix"
      v-if="flagLevel == 'readOnly' ? true : false"
    >
      <el-button type="primary" plain @click="editHandel">修改</el-button>
      <el-button type="primary" plain @click="returnBack">返回</el-button>
    </div>
    <div class="button-sx-f clearfix" v-else>
      <el-button type="primary" plain @click="saveHandel">保存</el-button>
      <el-button type="primary" plain @click="concelClick">取消</el-button>
    </div>
  </div>
</template>
<script>
import CustomerInfoManageServer from "@/api/customer/CustomerInfoManageServer";
export default {
  name: "CustCutoverInfo",
  data() {
    return {
      flagLevel: "readOnly",
      labelPosition: "left",
      // isIndeterminate:true,
      // checkAll:false,
      allDate:true,
      //规则检验
      dataRules:{
        emailA: [
          { type: "email", message: "请输入正确的邮箱地址", trigger: "blur" },
        ],
        emailB:[
          { type: "email", message: "请输入正确的邮箱地址", trigger: "blur" },
        ],
        mobileNumberA:[
          {
            message: "移动电话格式不正确",
            pattern: /^[\d]+([\d-+]*)$/,
            trigger: "blur",
          },
          { min: 11, message: "移动电话长度不能小于11位", trigger: "blur" },
        ],
        mobileNumberB:[
          {
            message: "移动电话格式不正确",
            pattern: /^[\d]+([\d-+]*)$/,
            trigger: "blur",
          },
          { min: 11, message: "移动电话长度不能小于11位", trigger: "blur" },
        ],
      },
      cutOverInfo: {},
      //平台产品类型数组
      broadbandProductTypeArr: [
        {
          label:'秒级的保护倒换认为不中断',
          val:'1'
        },
        {
          label:'1秒以上至5分钟以内的瞬断',
          val:'2'
        },
        {
          label:'5分钟以上中断',
          val:'3'
        },
      ],
      //割接影响业务时间点是否通知
      cutOverTimeArr: [
        {
          label:'全天',
          val:'0',
        },
        {
          label:'0点-6点',
          val:'1',
        },
        {
          label:'6点-12点',
          val:'2',
        },
        {
          label:'12点-18点',
          val:'3',
        },
        {
          label:'18点-24点',
          val:'4',
        },
      ],
      cutOverInfoFormData: {
        emailA: "",
        mobileNumberA: "",
        partyIdA:'',
        custManagerNameAID: "",
        emailB: "",
        mobileNumberB: "",
        partyIdB:'',
        custManagerNameBID: "",
        //割接影响业务时长是否通知
        ifInformLength: "",
        //带宽型产品中断类型
        bandwidthType: [],
        // 平台型产品中断类型
        platformType: [],
        cutInformType:'',//割接通知方式
        ifSendPhoneMessage:'',//是否发送手机短信
        sendPhoneMessageQuantum:'',//发送时间段
        ifInformTime:'',//割接影响业务时间点是否通知
        infoTimeQuantum:[],//通知时间点
        cutInformChinese:'',//割接语种是否为中文
        cutInformChineseName:'',//通知时使用的中文名称（割接邮件抬头）
        cutInformEnglish:'',//割接语种是否为英文
        cutInformEnglishName:'',//通知时使用的英文名称（割接邮件抬头）
        //是否割接通知同步给网厅
        ifSynchroToOnline: '',
        info:'',
      },

      // 接收单位联系信息
      tableData: [],
      tablePage: {
        pageIndex: 1, //当前页码
        pageSize: 5, //每页多少条
        rowCount: 0, //总条数
      },
      // 接收单位联系信息表格分页
      queryTableData: {
        pageIndex: 1, //当前页码
        pageSize: 5, //每页多少条
        rowCount: 10, //总条数
        pageCount: 10, //总页数
      },
      custCutNoticeInfoId:'',//割接主键
    };
  },
  components: {},
  created() {},
  mounted() {
    this.getCustDetail();
    this.getContInfoList();
    this.getCustCutInfoList();
  },
  methods: {
    //获取用户信息
    async getCustDetail() {
      const response = await CustomerInfoManageServer.getCustDetail({
        custId: this.$route.query.custId,
        scope: "custAssignRel",
      });
      if (response.code == 200) {
        this.cutOverInfo = response.meta.customerDetail;
        this.cutOverInfo.custAssignRel.forEach((item) => {
          if (item.responsibilityTypeCd == 4) {
            this.cutOverInfoFormData.emailA = this.isNull(item.custAssignEmail);
            this.cutOverInfoFormData.mobileNumberA = this.isNull(
              item.custAssignPhone
            );
            this.cutOverInfoFormData.partyIdA = this.isNull(item.partyId);
            this.cutOverInfoFormData.custManagerNameAID = this.isNull(item.custAssignRelId);
          } else if (item.responsibilityTypeCd == 5) {
            this.cutOverInfoFormData.emailB = this.isNull(item.custAssignEmail);
            this.cutOverInfoFormData.mobileNumberB = this.isNull(
              item.custAssignPhone
            );
            this.cutOverInfoFormData.partyIdB = this.isNull(item.partyId);
            this.cutOverInfoFormData.custManagerNameBID = this.isNull(item.custAssignRelId);
          }
        });
      }
    },
    //接收单位联系信息
    async getContInfoList() {
      const response = await CustomerInfoManageServer.getContInfoList({
        partyId: this.$route.query.partyId,
        statusCdList: "1000",
        pageIndex: "1",
        pageSize: "100",
      });
      if (response.code == 200) {
        this.tableData = response.meta.executeSqlResp;
        this.tablePage.rowCount = response.meta.pageInfo.rowCount;
      }
    },
    //割接信息
    async getCustCutInfoList(){
      const response = await CustomerInfoManageServer.getCustCutInfoList({
        custId: this.$route.query.custId,
      });
      if (response.code == 200) {
          let res = response.meta;
          this.custCutNoticeInfoId = res.custCutNoticeInfoId;
          this.cutOverInfoFormData.ifInformLength = this.isNull(res.ifInformLength)
          //带宽型产品中断类型
          this.cutOverInfoFormData.bandwidthType = this.isNull(res.bandwidthType).split(',') != '' ? this.isNull(res.bandwidthType).split(','):[]
          // 平台型产品中断类型
          this.cutOverInfoFormData.platformType = this.isNull(res.platformType).split(',') != '' ? this.isNull(res.platformType).split(','):[]
          //割接通知方式
          this.cutOverInfoFormData.cutInformType = this.isNull(res.cutInformType).split(',')[0];
          this.cutOverInfoFormData.info = this.isNull(this.isNull(res.cutInformType).split(',')[1]) 
          
          //是否发送手机短信
          this.cutOverInfoFormData.ifSendPhoneMessage = this.isNull(res.ifSendPhoneMessage)
          //发送时间段
          this.cutOverInfoFormData.sendPhoneMessageQuantum = this.isNull(res.sendPhoneMessageQuantum)
          //割接影响业务时间点是否通知
          this.cutOverInfoFormData.ifInformTime = this.isNull(res.ifInformTime)
          //通知时间点
          this.cutOverInfoFormData.infoTimeQuantum = this.isNull(res.infoTimeQuantum).split(',')
          //割接语种是否为中文
          this.cutOverInfoFormData.cutInformChinese = this.isNull(res.cutInformChinese)
          //通知时使用的中文名称（割接邮件抬头）
          this.cutOverInfoFormData.cutInformChineseName = this.isNull(res.cutInformChineseName)
          //割接语种是否为英文
          this.cutOverInfoFormData.cutInformEnglish = this.isNull(res.cutInformEnglish)
          //通知时使用的英文名称（割接邮件抬头）
          this.cutOverInfoFormData.cutInformEnglishName = this.isNull(res.cutInformEnglishName)
          //割接影响业务时间点是否通知
          this.cutOverInfoFormData.ifSynchroToOnline = this.isNull(res.ifSynchroToOnline)
      }
    },
    //割接影响业务时间点是否通知选项改变
    changeAllDate(val){
      
      if(val[0] != "0" && val.length == 4){
         if(this.allDate) {
           this.cutOverInfoFormData.infoTimeQuantum = ['0','1','2','3','4']
           this.allDate = false;
         }
      }else if(val[0] == "0" && val.length<5){
          this.cutOverInfoFormData.infoTimeQuantum.shift(0,1);
          this.allDate = true;
      }
    },
    changeDate(val){
       if(val == '0' && this.allDate){
         this.cutOverInfoFormData.infoTimeQuantum = ['0','1','2','3','4']
         this.allDate = !this.allDate
       }else if(val == '0' && !this.allDate) {
         this.cutOverInfoFormData.infoTimeQuantum = []
         this.allDate = !this.allDate
       }
    },
    editHandel() {
      this.flagLevel = "editFlag";
    },
    async saveHandel() {
      this.$refs.formDataRef.validate((valid) => {
        if (valid) {
          this.saveInfo();
        } else {
          return false;
        }
      });

    },
    //校验联系人输入框
    checkInput(val,num){
       if(num == 1 && val != ''){
          var mobilephone=/^[\d+]+[\d-+]*$/;
          if (mobilephone.test(val)) {
            if(val.length < 11){
              this.$confirm("移动电话只能是11位阿拉伯数字!", "提示", {
                confirmButtonText: "关闭",
                showCancelButton: false,
                type: 'warning',
                center: true,
              })
            }
          }else {
            this.$confirm("移动电话只能是11位阿拉伯数字!", "提示", {
              confirmButtonText: "关闭",
              showCancelButton: false,
              type: 'warning',
              center: true,
            })
          }
       }else if(num == 2 && val != ''){
          var reg_email=/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;
          if(!reg_email.test(val)){
              this.$confirm("邮箱格式不正确!", "提示", {
                confirmButtonText: "关闭",
                showCancelButton: false,
                type: 'warning',
                center: true,
              })
          }
       }else if(num == 3 && val != ''){
          var cellphone=/^[\d]+([\d-+]*)$/;
          if(cellphone.test(val)){
              if(val.length < 6){
                this.$confirm("传真长度不能小于6位!", "提示", {
                  confirmButtonText: "关闭",
                  showCancelButton: false,
                  type: 'warning',
                  center: true,
                })
              }
          }else {
             this.$confirm("传真格式不正确!", "提示", {
              confirmButtonText: "关闭",
              showCancelButton: false,
              type: 'warning',
              center: true,
            })
          }
       }
    },
    async saveInfo(){
      if(this.cutOverInfoFormData.cutInformType == ''){
        this.$confirm("割接通知方式：电子邮件、传真至少选一项!", "提示", {
          confirmButtonText: "关闭",
          showCancelButton: false,
          type: 'warning',
          center: true,
        })
        return false
      }
      if(this.cutOverInfoFormData.ifSendPhoneMessage == 1 && this.cutOverInfoFormData.sendPhoneMessageQuantum == ''){ 
        this.$confirm("手机短信选为是，则其后方式需选择一种!", "提示", {
          confirmButtonText: "关闭",
          showCancelButton: false,
          type: 'warning',
          center: true,
        })
        return false
      }
      if(this.cutOverInfoFormData.ifInformTime == 1 && this.cutOverInfoFormData.infoTimeQuantum.length == 0){
        this.$confirm("割接影响业务时间点是否通知选择为是，则需选择其后时间段区间！", "提示", {
          confirmButtonText: "关闭",
          showCancelButton: false,
          type: 'warning',
          center: true,
        })
        return false
      }
      if(this.cutOverInfoFormData.cutInformChinese != 1 && this.cutOverInfoFormData.cutInformEnglish != 1){
        this.$confirm("割接通知语种：中文、英文必选一种!", "提示", {
          confirmButtonText: "关闭",
          showCancelButton: false,
          type: 'warning',
          center: true,
        })
        return false
      }
      if(this.cutOverInfoFormData.ifSynchroToOnline == ''){
        this.$confirm("是否割接通知同步给网厅不能为空，请选择!", "提示", {
          confirmButtonText: "关闭",
          showCancelButton: false,
          type: 'warning',
          center: true,
        })
        return false
      }
      if(this.cutOverInfoFormData.cutInformChinese == 1 && this.cutOverInfoFormData.cutInformChineseName == ''){
        this.$confirm("通知时使用的中文名称不能为空!", "提示", {
          confirmButtonText: "关闭",
          showCancelButton: false,
          type: 'warning',
          center: true,
        })
        return false
      }
      if(this.cutOverInfoFormData.cutInformEnglish == 1 && this.cutOverInfoFormData.cutInformEnglishName == ''){
        this.$confirm("通知时使用的英文名称不能为空!", "提示", {
          confirmButtonText: "关闭",
          showCancelButton: false,
          type: 'warning',
          center: true,
        })
        return false
      }
      let contactsInfo = [];
      let checkTrue = true;
      this.tableData.forEach((item)=>{
          let contact = {};
          if(this.isNull(item.eMail) == '' && this.isNull(item.fax) == ''){
            checkTrue = false
          }
          contact['contactId']  = this.isNull(item.contactId);
          contact['mobilePhone'] = this.isNull(item.mobilePhone);
          contact['eMail'] = this.isNull(item.eMail);
          contact['fax'] = this.isNull(item.fax);
          contactsInfo.push(contact);
      })
      if(!checkTrue){
        this.$confirm("联系人信息：Email电子邮件、联系传真至少填写其中一项!", "提示", {
          confirmButtonText: "关闭",
          showCancelButton: false,
          type: 'warning',
          center: true,
        })
        return false
      }
      let params = {
        partyId:this.$route.query.partyId,
        custId:this.$route.query.custId,
        staffId:this.$route.query.staffId,
        custAssignContactsInfo:this.cutOverInfoFormData.partyIdB ? [
          {
            contactId:this.cutOverInfoFormData.custManagerNameAID,
            mobilePhone:this.cutOverInfoFormData.mobileNumberA,
            eMail:this.cutOverInfoFormData.emailA,
            contactName:this.cutOverInfo.custManagerNameA ? this.cutOverInfo.custManagerNameA : "",
            partyId:this.cutOverInfoFormData.partyIdA
          },
          {
            contactId:this.cutOverInfoFormData.custManagerNameBID,
            mobilePhone:this.cutOverInfoFormData.mobileNumberB,
            eMail:this.cutOverInfoFormData.emailB,
            contactName:this.cutOverInfo.custManagerNameB ? this.cutOverInfo.custManagerNameB : "",
            partyId:this.cutOverInfoFormData.partyIdB
          }
        ]:[
          {
            contactId:this.cutOverInfoFormData.custManagerNameAID,
            mobilePhone:this.cutOverInfoFormData.mobileNumberA,
            eMail:this.cutOverInfoFormData.emailA,
            contactName:this.cutOverInfo.custManagerNameA ? this.cutOverInfo.custManagerNameA : "",
            partyId:this.cutOverInfoFormData.partyIdA
          }],
        contactsInfo:contactsInfo,
        ifInformLength:this.cutOverInfoFormData.ifInformLength,
        bandwidthType:this.cutOverInfoFormData.bandwidthType.join(','),
        platformType:this.cutOverInfoFormData.platformType.join(','),
        cutInformType:this.cutOverInfoFormData.info ? this.cutOverInfoFormData.cutInformType + ',' + '3' : this.cutOverInfoFormData.cutInformType,
        ifSendPhoneMessage:this.cutOverInfoFormData.ifSendPhoneMessage,
        sendPhoneMessageQuantum:this.cutOverInfoFormData.ifSendPhoneMessage == 1 ? this.cutOverInfoFormData.sendPhoneMessageQuantum : '',
        ifInformTime:this.cutOverInfoFormData.ifInformTime,
        infoTimeQuantum:this.cutOverInfoFormData.ifInformTime == 1 ? this.cutOverInfoFormData.infoTimeQuantum.join(',') : '',
        cutInformChinese:this.cutOverInfoFormData.cutInformChinese,
        cutInformChineseName:this.cutOverInfoFormData.cutInformChineseName,
        cutInformEnglish:this.cutOverInfoFormData.cutInformEnglish,
        cutInformEnglishName:this.cutOverInfoFormData.cutInformEnglishName,
        ifSynchroToOnline:this.cutOverInfoFormData.ifSynchroToOnline,
        custCutNoticeInfoId:this.custCutNoticeInfoId
      }
      const response = await CustomerInfoManageServer.saveCustCutInfo(params)
      if(response.code == 200){
         if(response.meta.resultCode == 0){
            this.$router.push({
              path: "/custbaseinf",
            });
         }else {
           this.$message({
              showClose: true,
              message: response.meta.resultMsg,
              type: 'error'
            });
         }
      }
    },
    concelClick() {
      this.flagLevel = "readOnly";
      this.getCustDetail();
      this.getContInfoList();
      this.getCustCutInfoList();
    },
    aaa(val){
      
    },
    custManagerIdDialogRow() {
      
    },
    pageChange(val) {
      this.tablePage.pageIndex = val;
    },
    returnBack() {
      this.$router.push({
        path: "/custbaseinf",
        query: {
          // partyId: "2102",
          // staffId: "100078",
          // type: "customerAdd",
        },
      });
    },
    // 判断值是否存在
    isNull(val) {
      if (
        val == "NaN" ||
        val == "null" ||
        val == "undefined" ||
        val == undefined
      ) {
        return (val = "");
      } else {
        return val;
      }
    },
  },
};
</script>
<style lang="scss" scoped>
.container {
  padding: 0.2rem 0.3rem 1rem;
  background-color: #fff;
}
.input-with-select {
  width: 100%;
}
.u-ipt {
  margin-bottom: 0.2rem;
}
.u-ipt > ::v-deep .el-form-item__content {
  position: relative;
  line-height: normal;
  top: 0.08rem;
}
.radio-box {
  margin-top: 0.1rem;
}
.f-fl {
  float: left;
  margin-right: 0.2rem;
}
.m-title {
  margin-top: 20px;
  margin-bottom: 20px;
  color: #0052d9;
  font-size: 12px;
}
.m-title .icon {
  float: left;
  display: block;
  width: 4px;
  height: 12px;
  background: #f56f3c;
  margin-top: 2px;
  margin-right: 10px;
  font-size: 14px;
}
.button-sx-f {
  position: fixed;
  width: 100%;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  z-index: 999;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.4);
  padding: 10px 0 20px;
  box-shadow: 0px 10px 14px 10px rgba(0, 0, 0, 0.1);
}

.cust-base-info {
  background: #fff;
  padding: 10px 20px;
}
.m-table-box {
  margin-top: 0.2rem;
}
.m-pagination {
  margin-top: 20px;
  margin-right: 100px;
  text-align: right;
}
.noteClass {
  position: relative;
  bottom: 0.02rem;
}
</style>
